package com.ljx.recruitment.security.config;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.ljx.recruitment.interview.typehandler.DeliverDetailsTypeHandler;
import com.ljx.recruitment.interview.typehandler.JobLocationDetailsTypeHandler;
import com.ljx.recruitment.interview.typehandler.details.DeliverDetails;
import com.ljx.recruitment.interview.typehandler.details.JobLocationDetails;
import com.ljx.recruitment.user.typehandler.TenantResumeTypeHandler;
import com.ljx.recruitment.user.typehandler.TenantThemeTypeHandler;
import com.ljx.recruitment.user.typehandler.details.ResumeDetails;
import com.ljx.recruitment.user.typehandler.details.ThemeDetails;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-10-13  15:32
 */
@Configuration
public class MyBatisUserConfig {

    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return configuration -> {
            configuration.getTypeHandlerRegistry().register(ThemeDetails.class, TenantThemeTypeHandler.class);
            configuration.getTypeHandlerRegistry().register(ResumeDetails.class, TenantResumeTypeHandler.class);
            configuration.getTypeHandlerRegistry().register(DeliverDetails.class, DeliverDetailsTypeHandler.class);
            configuration.getTypeHandlerRegistry().register(JobLocationDetails.class, JobLocationDetailsTypeHandler.class);
        };
    }
}
